package com.appkubes.fintech.admin.application.bill.dao;

import com.appkubes.fintech.admin.application.bill.entity.dto.BillReportDTO;
import com.appkubes.fintech.admin.application.bill.entity.dto.BillReportVO;
import com.appkubes.fintech.admin.application.bill.entity.vo.RentBillHeaderRequest;
import com.appkubes.fintech.admin.application.bill.entity.dto.RentBillHeaderDTO;
import com.appkubes.fintech.core.pojo.FintechRentBillHeaderMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.springframework.stereotype.Repository;

import java.util.List;

/*
* 账单列表
* @author  xqc
* @date 	2020/01/03 19:02:40
*/
@Mapper
@Repository
public interface RentBillHeaderDao extends FintechRentBillHeaderMapper {


    @SelectProvider(type= RentBillHeaderSqlProvider.class, method="select")
    List<RentBillHeaderDTO> queryPage(RentBillHeaderRequest request);


    @SelectProvider(type= RentBillHeaderSqlProvider.class, method="billReport")
    List<BillReportDTO> billReport(BillReportVO vo);

    @Select({"select count(*) from fintech_rent_bill_header where status = #{status} and user_key= #{userKey}"})
    int selectCount(String status,String userKey);
}
